/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ufes.pss.exercicioSwingBanco.view;

import javax.swing.JOptionPane;

/**
 *
 * @author OdairJT
 */
public class DefinirRegionaisDiretorView extends javax.swing.JFrame {

    /**
     * Creates new form DefinirRegionaisDiretor
     */
    public DefinirRegionaisDiretorView() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlBarraBotoes = new javax.swing.JPanel();
        btnFechar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEstados = new javax.swing.JTable();
        cmbEstados = new javax.swing.JComboBox();
        btnAdicionar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("DEFINIR REGIONAIS DIRETOR");

        pnlBarraBotoes.setBackground(new java.awt.Color(204, 204, 204));

        btnFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/CancelImagem.gif"))); // NOI18N
        btnFechar.setText("Fechar");

        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/DeleteImagem.gif"))); // NOI18N
        btnExcluir.setText("Excluir");

        org.jdesktop.layout.GroupLayout pnlBarraBotoesLayout = new org.jdesktop.layout.GroupLayout(pnlBarraBotoes);
        pnlBarraBotoes.setLayout(pnlBarraBotoesLayout);
        pnlBarraBotoesLayout.setHorizontalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap(217, Short.MAX_VALUE)
                .add(btnExcluir)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnFechar)
                .addContainerGap())
        );
        pnlBarraBotoesLayout.setVerticalGroup(
            pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBarraBotoesLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlBarraBotoesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnFechar)
                    .add(btnExcluir))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tblEstados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null},
                {null},
                {null},
                {null}
            },
            new String [] {
                "Estado"
            }
        ));
        jScrollPane1.setViewportView(tblEstados);

        btnAdicionar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/edu/ufes/pss/exercicioSwingBanco/image/NewImagem.gif"))); // NOI18N
        btnAdicionar.setText("Adicionar");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(cmbEstados, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 277, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(btnAdicionar))
            .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 374, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cmbEstados, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btnAdicionar))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnlBarraBotoes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdicionar;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnFechar;
    private javax.swing.JComboBox cmbEstados;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlBarraBotoes;
    private javax.swing.JTable tblEstados;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the btnAdicionar
     */
    public javax.swing.JButton getBtnAdicionar() {
        return btnAdicionar;
    }

    /**
     * @return the btnExcluir
     */
    public javax.swing.JButton getBtnExcluir() {
        return btnExcluir;
    }

    /**
     * @return the btnFechar
     */
    public javax.swing.JButton getBtnFechar() {
        return btnFechar;
    }

    /**
     * @return the cmbEstados
     */
    public javax.swing.JComboBox getCmbEstados() {
        return cmbEstados;
    }

    /**
     * @return the tblEstados
     */
    public javax.swing.JTable getTblRegiaoEstado() {
        return tblEstados;
    }
    
    public void showMessage(String pMessage){
        JOptionPane.showMessageDialog(this, pMessage);
    }
    
    public int showConfirmMessage(String pTitulo, String pMessage){
        return JOptionPane.showConfirmDialog(this, pMessage, pTitulo, JOptionPane.YES_NO_OPTION);
    }

}
